﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Data.Sql;

namespace FirstFloor.ModernUI.App.Pages.items
{
    /// <summary>
    /// Interaction logic for AddItem.xaml
    /// </summary>
    public partial class EditDeleteItemCont : UserControl
    {
        public EditDeleteItemCont()
        {
            InitializeComponent();
         //   var edit = new EditDeleteItem();

         //   DataRowView dataRow = (DataRowView)edit.DG1.SelectedItem;

         //   int index = edit.DG1.CurrentCell.Column.DisplayIndex;

         //   string cellValue = dataRow.Row.ItemArray[index].ToString();





         //   SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=test_db;Integrated Security=True");
         //   SqlCommand comm = new SqlCommand("select * from item where item_barcode=cellValue ", conn);
         //   conn.Open();
         //   SqlDataReader dr = comm.ExecuteReader();
         ////   comm.Parameters.AddWithValue("@cellValue",)
         //   txt_ProdName.Text = dr["item_name"].ToString();
         //   conn.Close();
            

        }

        private void cbo_total_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
         
        }

        private void RadioButton_Checked(object sender, RoutedEventArgs e)
        {
            txtbx_barcode.IsEnabled = false;
        }

        private void man_barcode_chk_Checked(object sender, RoutedEventArgs e)
        {
            txtbx_barcode.IsEnabled = true;
            txtbx_barcode.Focus();
        }

        private void txt_ProdName_TextChanged(object sender, TextChangedEventArgs e)
        {

        }
    }
}
